<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ include file="/WEB-INF/jsp/business/include/doctype.jsp" %>
<script type="text/javascript" src="${requestScope.contextPath}/js/cubiq-iscroll/iscroll.js"></script>
<script type="text/javascript">
var myScroll;
function loaded() {
	myScroll = new iScroll('wrapper', { 
		checkDOMChanges: true,
		zoom: false
	});
}
document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);
window.addEventListener('DOMContentLoaded', setTimeout(function () { loaded(); }, 200), false);
</script>
<style type="text/css" media="all">
	#wrapper { position:absolute; top:46px; bottom:0px; left:0; width:320px; overflow:auto;  }
	#scroller { position:absolute;  -webkit-tap-highlight-color:rgba(0,0,0,0); width:100%; padding:0;}
	.mainSearch_ .icon{min-height:290px; left:0; top:40px; width:100%;}
	.mainSearch_ .icon ul{ overflow:auto; min-height:290px; width:95%; padding-left:9px;  background:none;}
	.mainSearch_ .icon li{float:left; width:68px; padding:11px 0 10px 6px; font-size:11px;}
	.mainSearch_ .icon li span{display:block; width:72px; padding:3px 6px 0 0; text-align:center; color:#3b4959; font-weight:normal;}
</style>
<script type="text/javascript">
	// IKENUC, 전자결재 업데이트 관련 임시 이벤트
	function setupCheck(appNm, fileNm, obj, fdrNm) {
		$.ajax({
			url: '${requestScope.contextPath}/business/main/appSetupCheck.do',
			type:'POST',
			data: { 'appNm': appNm },
			dataType:'json',
			success: function(json){
				if (json.cnt == 0)
					location.href = 'kolonAppCheck://<fmt:message bundle="${config}" key="app.iPhone.url" /><fmt:message bundle="${config}" key="domain.iis.url" /><fmt:message bundle="${config}" key="app.file.iPhone.path" />'+fdrNm+'/'+fileNm;
				else
					location.href = 'kolonAppCheck://'+appNm+'://?<fmt:message bundle="${config}" key="domain.iis.url" /><fmt:message bundle="${config}" key="app.file.iPhone.path" />'+fdrNm+'/'+fileNm;
			},
			error: function(){
				//alert('error');
				location.href = 'kolonAppCheck://'+appNm+'://?<fmt:message bundle="${config}" key="domain.iis.url" /><fmt:message bundle="${config}" key="app.file.iPhone.path" />'+fdrNm+'/'+fileNm;
			}
		});
	}
	function iconSearch() {
		if($('#schTxt').val() == '') {
			alert('검색어를 입력해 주시기 바랍니다.');
			return;
		}
		document.getElementById('schForm').submit();
	}
</script>
</head>
<body>
	<div id="wrap">
		<div class="header">
			<h1>검색</h1>
		</div><!-- // header -->
		<div id="wrapper">
			<div id="scroller" style="position:relative; width:100%; background:url(/images/setup/login_bg.gif) repeat;">
				<form id="schForm" action="" method="get">
					<fieldset>
						<legend>메뉴검색</legend>
							<h3 class="main_h3"><input type="text" id="schTxt" name="schTxt" class="main_search" value="${schTxt}" /><a href="#" onclick="iconSearch();"><img src="${requestScope.contextPath}/images/setup/search_btn.gif" alt="검색" /></a></h3>
					</fieldset>
				</form>
				<div class="mainSearch_">
					<div class="icon">
						<ul>
						<c:choose>
						<c:when test="${empty servList}">
							<li style="text-align:center; width:300px; font-size: 15px; font-weight: bold; padding-top: 60px; ">검색된 서비스가 없습니다.</li>
						</c:when>
						<c:otherwise>
						<c:forEach items="${servList}" var="servInfo" varStatus="status">
							<c:choose>
							<c:when test="${servInfo.SERV_TP eq 'B' and platForm eq 'Android'}">
								<li><a href="<fmt:message bundle="${config}" key="domain.iis.url" /><fmt:message bundle="${config}" key="app.file.Android.path" />${servInfo.FDR_NM}/${servInfo.FILE_S_NM_1}"><img src="${requestScope.contextPath}<fmt:message bundle="${config}" key="service.icon.url" />${servInfo.IMG_NM}" alt="${servInfo.SERV_NM}" width="68" height="68" /></a><span>${servInfo.SERV_NM}</span></li>
							</c:when>
							<c:when test="${servInfo.SERV_TP eq 'C' and platForm eq 'iPhone'}">
								<c:choose>
									<c:when test="${servInfo.APP_NM eq 'ikenuc' or servInfo.APP_NM eq 'msign'}">
										<c:choose>
										<c:when test="${servInfo.APP_NM eq 'ikenuc'}">
										<li><a href="javascript:setupCheck('ikenuc', '${servInfo.FILE_S_NM_1}', this, '${servInfo.FDR_NM}');"><img src="${requestScope.contextPath}<fmt:message bundle="${config}" key="service.icon.url" />${servInfo.IMG_NM}" alt="${servInfo.SERV_NM}" width="68" height="68" /></a><span>${servInfo.SERV_NM}</span></li>	
										</c:when>
										<c:otherwise>
										<li><a href="javascript:setupCheck('msign', '${servInfo.FILE_S_NM_1}', this, '${servInfo.FDR_NM}');"><img src="${requestScope.contextPath}<fmt:message bundle="${config}" key="service.icon.url" />${servInfo.IMG_NM}" alt="${servInfo.SERV_NM}" width="68" height="68" /></a><span>${servInfo.SERV_NM}</span></li>
										</c:otherwise>
										</c:choose>
									</c:when>
									<c:otherwise>
										<li><a href="kolonAppCheck://${servInfo.APP_NM}://?<fmt:message bundle="${config}" key="domain.iis.url" /><fmt:message bundle="${config}" key="app.file.iPhone.path" />${servInfo.FDR_NM}/${servInfo.FILE_S_NM_1}"><img src="${requestScope.contextPath}<fmt:message bundle="${config}" key="service.icon.url" />${servInfo.IMG_NM}" alt="${servInfo.SERV_NM}" width="68" height="68" /></a><span>${servInfo.SERV_NM}</span></li>
									</c:otherwise>
								</c:choose>
							</c:when>
							<c:when test="${servInfo.SERV_TP eq 'A'}"> 
								<c:choose>
								<c:when  test="${servInfo.SERV_NM eq '콘사이스'}">
									<c:if test="${sessionScope.SESSION_USER_INFO.conciseGrade ne ''}">
										<li><a href="${servInfo.LNK_URL}"><img src="${requestScope.contextPath}<fmt:message bundle="${config}" key="service.icon.url" />${servInfo.IMG_NM}" alt="${servInfo.SERV_NM}" width="68" height="68" /></a><span>${servInfo.SERV_NM}</span></li>
									</c:if>
								</c:when>
								<c:otherwise>
									<li><a href="${servInfo.LNK_URL}"><img src="${requestScope.contextPath}<fmt:message bundle="${config}" key="service.icon.url" />${servInfo.IMG_NM}" alt="${servInfo.SERV_NM}" width="68" height="68" /></a><span>${servInfo.SERV_NM}</span></li>
								</c:otherwise>
								</c:choose>
							</c:when>
							</c:choose>
						</c:forEach>
						</c:otherwise>
						</c:choose>
						</ul>
					</div>
				</div>
			</div><!-- // login -->
		</div><!-- content -->
	</div><!-- // wrap -->
</body>
</html>